package cn.imvc.app.repositories;

import java.util.List;
import java.util.Set;

import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import cn.imvc.app.entities.GoodsClass;
import cn.imvc.data.jpa.repository.IJpqlExecutor;

public interface GoodsClassRepository extends JpaRepository<GoodsClass, Integer>,IJpqlExecutor<GoodsClass>
{
	List<GoodsClass> findByParentIsNull(Sort sort);
    
	Set<GoodsClass> findByParentIsNull();
	
	Set<GoodsClass> findByParentId(int id);

	List<GoodsClass> findByParentIsNullOrderBySortAsc();

	List<GoodsClass> findByParentIdOrderBySortAsc(int id);

}
